<template>
    <div class="charge">
        <div class="header-title">
            <span
                @click="$router.go(-1)"
                class="mint-toast-icon mintui mintui-back"
            ></span>
            <span>选择币种</span>
            <span></span>
        </div>
        <div class="title-two">
            <div class="title-choose">
                <div @click="titleColor = 1" :class="{'title-choose-now':titleColor==1}">法币账户</div>
                <div @click="titleColor = 2" :class="{'title-choose-now':titleColor==2}">房产账户</div>
            </div>
        </div>
        <div class="totle">
            <div class="charge-content">
                <div class="charge-content-choose">
                    <span>BTC</span>
                    <div @click="closeType =! closeType">
                        <span>选择币种</span>
                        <span class="fa fa-angle-right"></span>
                    </div>
                </div>
            </div>
            <div class="mention-add">
                <p>提币地址</p>
                <div>
                    <input type="text" placeholder="输入或者长按粘贴地址" />
                    <img
                        @click="$router.push({name:'scan'})"
                        src="../../../assets/img/saomiao.png"
                        alt
                    />
                </div>
            </div>
            <div class="mention-add">
                <p>数量</p>
                <div>
                    <input type="text" placeholder="最小提币数量1" />
                    <div>
                        <span style="color:#999">BTC</span>
                        <span style="color:#999">|</span>
                        <span>全部</span>
                    </div>
                </div>
                <p>可用0.000000 BTC</p>
            </div>
            <div class="mention-add">
                <p>手续费</p>
                <div>
                    <p>0.100000</p>
                    <span>BTC</span>
                </div>
            </div>
            <div class="charge-explain">
                <p>
                    最小提币数量为：1 BTC为了保障资金安全，当您账户安全策略变更、密码修改、我们
                    会对提币进行人工审核，请耐心等待工作人员电话或邮件联系。
                    请务必确认电脑及浏览器安全，防止信息被篡改或泄露。
                </p>
            </div>
            <div class="mention-btn">
                <div>
                    <span>到账数量</span>
                    <span>0.000000 BTC</span>
                </div>
                <mt-button class="charge-btn" size="normal" type="primary">提币</mt-button>
            </div>

            <!-- 验证弹出层 -->
            <mt-popup class="verify" v-model="popupVisible" position="center">
                <img src="../../../assets/img/yanzheng.png" alt />
                <p>为了您的资金安全，需要验证绑定您的信息才可以进行其他操作</p>
                <mt-button class="charge-btn" size="normal" type="primary">提币</mt-button>
            </mt-popup>
        </div>
        <!-- 选择币种 -->
        <typeSelect v-show="closeType" @getCloseStatus = getCloseStatus @getBinType = getBinType></typeSelect>
    </div>
</template>
<script>
import { Toast } from "mint-ui";
import typeSelect from '../../../components/typeSelect'
export default {
    data() {
        return {
            //修改title颜色
            titleColor: 1,
            //弹出层
            popupVisible: true,
            //关闭类型选项
            closeType:false,
            //子组件所穿的值
            binType:"",
        };
    },
      components:{
       typeSelect 
    },
    methods: {
        //接收子组件关闭状态
        getCloseStatus(status){
            this.closeType = status
        },
        //接收子组件所传的值
        getBinType(num){
            this.binType = num
            console.log(this.binType)
        }
    }
};
</script>
<style lang="less" scoped>
.charge {
    background-color: #fff;
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    overflow-y: scroll;
}
.header-title {
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 45px;
    padding: 0 15px;
    box-sizing: border-box;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}
.title-two {
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    .title-choose {
        height: 25px;
        width: 70%;
        border: 1px solid #365679;
        border-radius: 5px;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;

        > div {
            width: 50%;
            font-size: 14px;
            color: #365679;
            text-align: center;
            line-height: 25px;
        }
        .title-choose-now {
            background-color: #365679;
            color: #fff;
        }
    }
}
.totle {
    .charge-content {
        padding: 15px;
        box-sizing: border-box;
        background-color: #fff;
        .charge-content-choose {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
            > span {
                font-size: 18px;
                font-weight: 600;
                color: #333333;
            }
            > div {
                font-size: 12px;
                color: #999999;
            }
        }
    }
    .charge-explain {
        background-color: #f7f7fb;
        font-size: 12px;
        color: #7b91a9;
        padding: 15px;
        box-sizing: border-box;
        p {
            line-height: 25px;
        }
    }
    .mention-add {
        padding: 6px 15px 15px;
        box-sizing: border-box;
        color: #999;
        > p:nth-child(1) {
            font-size: 15px;
            color: #333333;
            font-weight: bold;
            margin-bottom: 15px;
        }
        > div:nth-child(2) {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #e6e6e6;
            padding-bottom: 8px;
            input {
                border: none;
                outline: none;
                font-size: 12px;
                color: #ccc;
                width: 60%;
            }
            img {
                width: 14px;
            }
            p {
                font-size: 14px;
                color: #333333;
            }
            span {
                color: #55a9e2;
                font-size: 12px;
            }
        }
        > p:nth-child(3) {
            margin-top: 5px;
            font-size: 12px !important;
        }
    }
    .mention-btn {
        padding: 15px;
        box-sizing: border-box;
        > div {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            color: #666666;
            margin-bottom: 10px;
            span:last-child {
                font-size: 12px;
                color: #55a9e2;
            }
        }
        .charge-btn {
            width: 100%;
            font-size: 16px;
            background-color: #365679;
            margin-bottom: 20px;
        }
    }
    //弹出层验证
    .verify {
        width: 90%;
        height: 200px;
        background-color: #fff;
        border-radius: 10px;
        overflow: hidden;
        padding: 15px;
        box-sizing: border-box;
        img {
            width: 16%;
            display: block;
            margin: 0 auto;
        }
        p {
            text-align: center;
            font-size: 14px;
            color: #333;
            margin: 10px 0;
            line-height: 26px;
        }
        .charge-btn {
            width: 100%;
            font-size: 16px;
            background-color: #365679;
            margin-bottom: 20px;
        }
    }
}
</style>
